Using the onlySettings property in a content type
The onlySetting
property indicates that a content type is meant for settings only.
You can use this attribute for content types that do not require storefront content, such as SEO pages.
Image 1 | Image 2 |
---|---|
Image 1 - Content type with onlySettings and with one tab for settings: SEO. | Image 2 - Content type without onlySettings and with two tabs: Sections and SEO. |
This property ensures the content type page displays only the available settings without the Sections tab. Follow the steps below to use the onlySettings
property for your desired content type.
Step-by-step​
- Go to the store repository and access
CMS
>content-types.json
. - Choose a content type and set the
onlySettings
property astrue
. For example:
{
"id": "SEO",
"name": "Global SEO Settings",
"onlySettings": true,
"configurationSchemaSets": [
{
"name": "SEO",
"configurations": [
...
]
}
]
}
- Sync your changes in the
CMS
folder by running the following command:
vtex cms sync
After syncing your changes, go to your store Admin and select Storefront > Headless CMS. Then, navigate to the content type to which the property was added and check if the only tab displayed is the settings tab.